#ifndef ELEMENTS_USER_TEAM_ROLE_H
#define ELEMENTS_USER_TEAM_ROLE_H

#include "common/more/json.h"

#include "element.h"

namespace Elements
{

struct UserTeamRole : public Element
{
    UserTeamRole() = default;
    UserTeamRole(const UserTeamRole& other);

    // -- Интерфейс элемента -- //

    virtual bool isSame(Element* other) const override;

    virtual Common::Json toJson() const override;
    virtual void fromJson(const Common::Json& json) override;

    virtual Element* clone() const override;
    virtual ElementType elementType() const override;

    // -- Интерфейс данных -- //

    unsigned userId() const;
    void setUserId(const unsigned value);

    unsigned teamId() const;
    void setTeamId(const unsigned value);

    unsigned roleId() const;
    void setRoleId(const unsigned value);

private:
    unsigned m_userId;
    unsigned m_teamId;
    unsigned m_roleId;

};

typedef std::shared_ptr<UserTeamRole> UserTeamRolePtr;
typedef std::vector<UserTeamRolePtr> UserTeamRoles;

} // namespace Elements

#endif // ELEMENTS_USER_TEAM_ROLE_H
